﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace AnLe.Models
{
    public class UsersModels
    {
        public static User getUserInfo(string username, string password)
        {
            try
            {
                anleDataContext anle = new anleDataContext();
                return (from m in anle.GetTable<User>()
                        where
                            (m.UserName == username) &&
                            (m.Password == password)
                        select m).First<User>();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    }
}